<template>
  <div>父组件向子组件传的第一个值为{{modelValue}}</div>
  <div>父组件向子组件传的第二个值为{{modelValue}}</div>

  <button @click="update">子组件通知父组件修改值</button>
</template>

<script setup>
const props = defineProps(['modelValue'])
const emits = defineEmits(['update:modelValue'])
const update = () =>{
    emits('update:modelValue',props.modelValue+1)
}
</script>